
cc.Class({
    extends: cc.Component,

    properties: {
        
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.node.on('touchstart', function (event) {
            event.stopPropagation();
            return false;
        });

        var self = this;
        WxApiHelper.createUserInfoButton(function(isEmpower){
            if(isEmpower){
                UIHelper.showLoaing();
                self.node.active = false;
                WxApiHelper.hideUserInfoButton();
                LoginHelper.login(function(){
                    UIHelper.hideLoaing();
                });
            }
        });
    },

    start () {

    },

    btnCallback: function(target, data){
        if(data === "empowerBtn"){
            // LoginHelper.login();
            
        }
    },

    // update (dt) {},
});
